def unit01() :
    print("")
    print("01、int和float相加，结果会自动转换成float=====================")
    num_int = 123
    num_flo = 1.23

    num_new = num_int + num_flo

    print("num_int的类型:", type(num_int))
    print("num_flo的类型:", type(num_flo))

    print("num_new的值:", num_new)
    print("num_new的类型:", type(num_new))
unit01()

def unit02() :
    print("")
    print("02、整型与字符串不能相加，需要显式转换=====================")
    num_int = 123
    num_str = "456"

    print("Data type of num_int:", type(num_int))
    print("Data type of num_str:", type(num_str))

    print(num_int + int(num_str))
unit02()

